const express = require("express")

const app = express()

// 中间件01
const mw1 = (req, res, next) => {
    console.log('中间件1');
    next()
}
// 中间件2
const mw2 = (req, res, next) => {
    console.log('中间件2');
    next()

}
// 定义路由
app.get('/', mw1,mw2,(req, res) => {
    res.send('//')
})

app.listen(8080, () => {
    console.log('2');
})